home *** CD-ROM | disk | FTP | other *** search
- if(!_parent.gamePaused)
- {
- if(this._y < _parent.topWall)
- {
- _parent.bulletsFired--;
- mcPath = eval(_target);
- mcPath.removeMovieClip();
- stop();
- }
- else
- {
- TargetY = _Y - 20;
- TargetX = _X;
- iterations = _parent.iterations;
- pixelsMoveY = (TargetY - _Y) / iterations;
- b = 1;
- while(iterations >= b)
- {
- testMoveY = _Y + pixelsMoveY * b;
- if(_parent.bricks.hitTest(_X,testMoveY,true))
- {
- _parent.bulletsFired--;
- _root.clipCounter = _root.clipCounter + 1;
- _root.attachMovie("mcExplosion","mcExplosion" + _root.clipCounter,_root.clipCounter);
- _root["mcExplosion" + _root.clipCounter]._x = TargetX;
- _root["mcExplosion" + _root.clipCounter]._y = testMoveY;
- _root["mcExplosion" + _root.clipCounter]._xscale = _parent.bulletSize / 4;
- _root["mcExplosion" + _root.clipCounter]._yscale = _parent.bulletSize / 4;
- _root["mcExplosion" + _root.clipCounter]._rotation = random(360);
- mcPath = eval(_target);
- mcPath.removeMovieClip();
- stop();
- break;
- }
- b++;
- }
- _Y = TargetY;
- gotoAndPlay(_currentframe - 1);
- }
- }
-